package 设计模式.prototype;

public class Client {
    public static void main(String[] args) {
        System.out.println("原型");
        Sheep sheep=new Sheep("tom",1,"白色");
        //Sheep sheep=new Sheep();
        //sheep.name="123";
        Sheep sheep1=(Sheep) sheep.clone();
        Sheep sheep2=(Sheep) sheep.clone();
        Sheep sheep3=(Sheep) sheep.clone();
        Sheep sheep4=(Sheep) sheep.clone();
        System.out.println("sheep ="+sheep);
        System.out.println("sheep1 ="+sheep1.hashCode());
        System.out.println("sheep2 ="+sheep2.hashCode());
        System.out.println("sheep3 ="+sheep3);
        System.out.println("sheep4 ="+sheep4);
    }
}
